<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::ximgproc::FastLineDetector Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d9/d29/namespacecv_1_1ximgproc.html">ximgproc</a></li><li class="navelem"><a class="el" href="../../df/d4c/classcv_1_1ximgproc_1_1FastLineDetector.html">FastLineDetector</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="../../dc/d4d/classcv_1_1ximgproc_1_1FastLineDetector-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::ximgproc::FastLineDetector Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="../../df/d2d/group__ximgproc.html">Extended Image Processing</a> » <a class="el" href="../../df/ded/group__ximgproc__fast__line__detector.html">Fast line detector</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>Class implementing the FLD (Fast Line Detector) algorithm described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Lee14">[137]</a> .  
 <a href="../../df/d4c/classcv_1_1ximgproc_1_1FastLineDetector.html#details">More...</a></p>
<p><code>#include &lt;opencv2/ximgproc/fast_line_detector.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::ximgproc::FastLineDetector:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../df/d4c/classcv_1_1ximgproc_1_1FastLineDetector.png" usemap="#cv::ximgproc::FastLineDetector_map"/>
  <map id="cv::ximgproc::FastLineDetector_map" name="cv::ximgproc::FastLineDetector_map">
<area alt="cv::Algorithm" coords="0,0,185,24" href="../../d3/d46/classcv_1_1Algorithm.html" shape="rect" title="This is a base class for all more or less complex algorithms in OpenCV. "/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac64d2be7dc8baf62ee45022fcb196aaa"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d4c/classcv_1_1ximgproc_1_1FastLineDetector.html#ac64d2be7dc8baf62ee45022fcb196aaa">~FastLineDetector</a> ()</td></tr>
<tr class="separator:ac64d2be7dc8baf62ee45022fcb196aaa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10d3ce6ef6bce92818d1f919e2b2aa57"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d4c/classcv_1_1ximgproc_1_1FastLineDetector.html#a10d3ce6ef6bce92818d1f919e2b2aa57">detect</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> _image, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> _lines)=0</td></tr>
<tr class="memdesc:a10d3ce6ef6bce92818d1f919e2b2aa57"><td class="mdescLeft"> </td><td class="mdescRight">Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image.  <a href="#a10d3ce6ef6bce92818d1f919e2b2aa57">More...</a><br/></td></tr>
<tr class="separator:a10d3ce6ef6bce92818d1f919e2b2aa57"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aacfbe367964959be1173013f53912fc5"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d4c/classcv_1_1ximgproc_1_1FastLineDetector.html#aacfbe367964959be1173013f53912fc5">drawSegments</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> _image, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> lines, bool draw_arrow=false)=0</td></tr>
<tr class="memdesc:aacfbe367964959be1173013f53912fc5"><td class="mdescLeft"> </td><td class="mdescRight">Draws the line segments on a given image.  <a href="#aacfbe367964959be1173013f53912fc5">More...</a><br/></td></tr>
<tr class="separator:aacfbe367964959be1173013f53912fc5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a827c8b2781ed17574805f373e6054ff1">Algorithm</a> ()</td></tr>
<tr class="separator:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a8ae826127fa0f1f8d10a24841bd376f8">~Algorithm</a> ()</td></tr>
<tr class="separator:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">clear</a> ()</td></tr>
<tr class="memdesc:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Clears the algorithm state.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">More...</a><br/></td></tr>
<tr class="separator:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#ab6a18f1825475643e94381697d413972">empty</a> () const</td></tr>
<tr class="memdesc:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a> is empty (e.g. in the very beginning or after unsuccessful read.  <a href="../../d3/d46/classcv_1_1Algorithm.html#ab6a18f1825475643e94381697d413972">More...</a><br/></td></tr>
<tr class="separator:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a286fc82744ccab3d248aca44524266a9">getDefaultName</a> () const</td></tr>
<tr class="separator:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm parameters from a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">More...</a><br/></td></tr>
<tr class="separator:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a0a880744bc4e3f45711444571df47d67">save</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename) const</td></tr>
<tr class="separator:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">write</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="memdesc:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Stores algorithm parameters in a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">More...</a><br/></td></tr>
<tr class="separator:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">write</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &gt; &amp;fs, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;name=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>()) const</td></tr>
<tr class="memdesc:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">More...</a><br/></td></tr>
<tr class="separator:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Static Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">load</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from the file.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">More...</a><br/></td></tr>
<tr class="separator:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">loadFromString</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;strModel, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from a String.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">More...</a><br/></td></tr>
<tr class="separator:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm from the file node.  <a href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">More...</a><br/></td></tr>
<tr class="separator:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Protected Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a68eeca71617474ad3d4561786f0289d2">writeFormat</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="separator:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class implementing the FLD (Fast Line Detector) algorithm described in <a class="el" href="../../d0/de3/citelist.html#CITEREF_Lee14">[137]</a> . </p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include "<a class="code" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>"</span></div><div class="line"><span class="preprocessor">#include "<a class="code" href="../../df/d6c/ximgproc_8hpp.html">opencv2/ximgproc.hpp</a>"</span></div><div class="line"><span class="preprocessor">#include "<a class="code" href="../../d6/d87/imgcodecs_8hpp.html">opencv2/imgcodecs.hpp</a>"</span></div><div class="line"><span class="preprocessor">#include "<a class="code" href="../../d4/dd5/highgui_8hpp.html">opencv2/highgui.hpp</a>"</span></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d8/dcc/namespacestd.html">std</a>;</div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d2/d75/namespacecv.html">cv</a>;</div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d9/d29/namespacecv_1_1ximgproc.html">cv::ximgproc</a>;</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv)</div><div class="line">{</div><div class="line">    <span class="keywordtype">string</span> in;</div><div class="line">    <a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html">CommandLineParser</a> parser(argc, argv, <span class="stringliteral">"{@input|corridor.jpg|input image}{help h||show help message}"</span>);</div><div class="line">    <span class="keywordflow">if</span> (parser.has(<span class="stringliteral">"help"</span>))</div><div class="line">    {</div><div class="line">        parser.printMessage();</div><div class="line">        <span class="keywordflow">return</span> 0;</div><div class="line">    }</div><div class="line">    in = <a class="code" href="../../d6/dba/group__core__utils__samples.html#ga3a33b00033b46c698ff6340d95569c13">samples::findFile</a>(parser.get&lt;<span class="keywordtype">string</span>&gt;(<span class="stringliteral">"@input"</span>));</div><div class="line"></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> image = <a class="code" href="../../d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56">imread</a>(in, <a class="code" href="../../d8/d6a/group__imgcodecs__flags.html#gga61d9b0126a3e57d9277ac48327799c80ae29981cfc153d3b0cef5c0daeedd2125">IMREAD_GRAYSCALE</a>);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span>( image.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#abbec3525a852e77998aba034813fded4">empty</a>() )</div><div class="line">    {</div><div class="line">        <span class="keywordflow">return</span> -1;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Create FLD detector</span></div><div class="line">    <span class="comment">// Param               Default value   Description</span></div><div class="line">    <span class="comment">// length_threshold    10            - Segments shorter than this will be discarded</span></div><div class="line">    <span class="comment">// distance_threshold  1.41421356    - A point placed from a hypothesis line</span></div><div class="line">    <span class="comment">//                                     segment farther than this will be</span></div><div class="line">    <span class="comment">//                                     regarded as an outlier</span></div><div class="line">    <span class="comment">// canny_th1           50            - First threshold for</span></div><div class="line">    <span class="comment">//                                     hysteresis procedure in Canny()</span></div><div class="line">    <span class="comment">// canny_th2           50            - Second threshold for</span></div><div class="line">    <span class="comment">//                                     hysteresis procedure in Canny()</span></div><div class="line">    <span class="comment">// canny_aperture_size 3            - Aperturesize for the sobel operator in Canny().</span></div><div class="line">    <span class="comment">//                                     If zero, Canny() is not applied and the input</span></div><div class="line">    <span class="comment">//                                     image is taken as an edge image.</span></div><div class="line">    <span class="comment">// do_merge            false         - If true, incremental merging of segments</span></div><div class="line">    <span class="comment">//                                     will be performed</span></div><div class="line">    <span class="keywordtype">int</span> length_threshold = 10;</div><div class="line">    <span class="keywordtype">float</span> distance_threshold = 1.41421356f;</div><div class="line">    <span class="keywordtype">double</span> canny_th1 = 50.0;</div><div class="line">    <span class="keywordtype">double</span> canny_th2 = 50.0;</div><div class="line">    <span class="keywordtype">int</span> canny_aperture_size = 3;</div><div class="line">    <span class="keywordtype">bool</span> do_merge = <span class="keyword">false</span>;</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr&lt;FastLineDetector&gt;</a> fld = <a class="code" href="../../df/ded/group__ximgproc__fast__line__detector.html#gaa9636e5033cd2939ec50810f2b2bd853">createFastLineDetector</a>(length_threshold,</div><div class="line">            distance_threshold, canny_th1, canny_th2, canny_aperture_size,</div><div class="line">            do_merge);</div><div class="line">    vector&lt;Vec4f&gt; lines;</div><div class="line"></div><div class="line">    <span class="comment">// Because of some CPU's power strategy, it seems that the first running of</span></div><div class="line">    <span class="comment">// an algorithm takes much longer. So here we run the algorithm 10 times</span></div><div class="line">    <span class="comment">// to see the algorithm's processing time with sufficiently warmed-up</span></div><div class="line">    <span class="comment">// CPU performance.</span></div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> run_count = 0; run_count &lt; 5; run_count++) {</div><div class="line">        <span class="keywordtype">double</span> freq = <a class="code" href="../../db/de0/group__core__utils.html#ga705441a9ef01f47acdc55d87fbe5090c">getTickFrequency</a>();</div><div class="line">        lines.clear();</div><div class="line">        <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga7cde0074dfd288f2d70c0e035dacb28a">int64</a> start = <a class="code" href="../../db/de0/group__core__utils.html#gae73f58000611a1af25dd36d496bf4487">getTickCount</a>();</div><div class="line">        <span class="comment">// Detect the lines with FLD</span></div><div class="line">        fld-&gt;detect(image, lines);</div><div class="line">        <span class="keywordtype">double</span> duration_ms = double(<a class="code" href="../../db/de0/group__core__utils.html#gae73f58000611a1af25dd36d496bf4487">getTickCount</a>() - start) * 1000 / freq;</div><div class="line">        cout &lt;&lt; <span class="stringliteral">"Elapsed time for FLD "</span> &lt;&lt; duration_ms &lt;&lt; <span class="stringliteral">" ms."</span> &lt;&lt; endl;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Show found lines with FLD</span></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> line_image_fld(image);</div><div class="line">    fld-&gt;drawSegments(line_image_fld, lines);</div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">"FLD result"</span>, line_image_fld);</div><div class="line"></div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7">waitKey</a>(1);</div><div class="line"></div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr&lt;EdgeDrawing&gt;</a> ed = <a class="code" href="../../d4/d8b/group__ximgproc__edge__drawing.html#gac06afd29523029534111a058c0711fd3">createEdgeDrawing</a>();</div><div class="line">    ed-&gt;params.EdgeDetectionOperator = <a class="code" href="../../d1/d1c/classcv_1_1ximgproc_1_1EdgeDrawing.html#add5e0d573db3cdbe3ebf014d238825e4a47d6ccdbd7dfa30a65b9de10862dd222">EdgeDrawing::SOBEL</a>;</div><div class="line">    ed-&gt;params.GradientThresholdValue = 38;</div><div class="line">    ed-&gt;params.AnchorThresholdValue = 8;</div><div class="line"></div><div class="line">    vector&lt;Vec6d&gt; ellipses;</div><div class="line"></div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> run_count = 0; run_count &lt; 5; run_count++) {</div><div class="line">        <span class="keywordtype">double</span> freq = <a class="code" href="../../db/de0/group__core__utils.html#ga705441a9ef01f47acdc55d87fbe5090c">getTickFrequency</a>();</div><div class="line">        lines.clear();</div><div class="line">        <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga7cde0074dfd288f2d70c0e035dacb28a">int64</a> start = <a class="code" href="../../db/de0/group__core__utils.html#gae73f58000611a1af25dd36d496bf4487">getTickCount</a>();</div><div class="line"></div><div class="line">        <span class="comment">// Detect edges</span></div><div class="line">        <span class="comment">//you should call this before detectLines() and detectEllipses()</span></div><div class="line">        ed-&gt;detectEdges(image);</div><div class="line"></div><div class="line">        <span class="comment">// Detect lines</span></div><div class="line">        ed-&gt;detectLines(lines);</div><div class="line">        <span class="keywordtype">double</span> duration_ms = double(<a class="code" href="../../db/de0/group__core__utils.html#gae73f58000611a1af25dd36d496bf4487">getTickCount</a>() - start) * 1000 / freq;</div><div class="line">        cout &lt;&lt; <span class="stringliteral">"Elapsed time for EdgeDrawing detectLines "</span> &lt;&lt; duration_ms &lt;&lt; <span class="stringliteral">" ms."</span> &lt;&lt; endl;</div><div class="line"></div><div class="line">        start = <a class="code" href="../../db/de0/group__core__utils.html#gae73f58000611a1af25dd36d496bf4487">getTickCount</a>();</div><div class="line">        <span class="comment">// Detect circles and ellipses</span></div><div class="line">        ed-&gt;detectEllipses(ellipses);</div><div class="line">        duration_ms = double(<a class="code" href="../../db/de0/group__core__utils.html#gae73f58000611a1af25dd36d496bf4487">getTickCount</a>() - start) * 1000 / freq;</div><div class="line">        cout &lt;&lt; <span class="stringliteral">"Elapsed time for EdgeDrawing detectEllipses "</span> &lt;&lt; duration_ms &lt;&lt; <span class="stringliteral">" ms."</span> &lt;&lt; endl;</div><div class="line">    }</div><div class="line"></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> edge_image_ed = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556">Mat::zeros</a>(image.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>(), <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>);</div><div class="line">    vector&lt;vector&lt;Point&gt; &gt; segments = ed-&gt;getSegments();</div><div class="line"></div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; segments.size(); i++)</div><div class="line">    {</div><div class="line">        <span class="keyword">const</span> <a class="code" href="../../db/d4e/classcv_1_1Point__.html">Point</a>* pts = &amp;segments[i][0];</div><div class="line">        <span class="keywordtype">int</span> n = (int)segments[i].<a class="code" href="../../df/d5b/namespacecv_1_1gapi_1_1streaming.html#a0a915e69f4cc8284293e40fc9ffbf157">size</a>();</div><div class="line">        <a class="code" href="../../d6/d6e/group__imgproc__draw.html#ga1ea127ffbbb7e0bfc4fd6fd2eb64263c">polylines</a>(edge_image_ed, &amp;pts, &amp;n, 1, <span class="keyword">false</span>, <a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>((rand() &amp; 255), (rand() &amp; 255), (rand() &amp; 255)), 1);</div><div class="line">    }</div><div class="line"></div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">"EdgeDrawing detected edges"</span>, edge_image_ed);</div><div class="line"></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> line_image_ed(image);</div><div class="line">    fld-&gt;drawSegments(line_image_ed, lines);</div><div class="line"></div><div class="line">    <span class="comment">// Draw circles and ellipses</span></div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; ellipses.size(); i++)</div><div class="line">    {</div><div class="line">        <a class="code" href="../../db/d4e/classcv_1_1Point__.html">Point</a> center((<span class="keywordtype">int</span>)ellipses[i][0], (<span class="keywordtype">int</span>)ellipses[i][1]);</div><div class="line">        <a class="code" href="../../d6/d50/classcv_1_1Size__.html">Size</a> axes((<span class="keywordtype">int</span>)ellipses[i][2] + (<span class="keywordtype">int</span>)ellipses[i][3], (<span class="keywordtype">int</span>)ellipses[i][2] + (<span class="keywordtype">int</span>)ellipses[i][4]);</div><div class="line">        <span class="keywordtype">double</span> angle(ellipses[i][5]);</div><div class="line">        <a class="code" href="../../d1/da0/classcv_1_1Scalar__.html">Scalar</a> color = ellipses[i][2] == 0 ? <a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(255, 255, 0) : <a class="code" href="../../d1/da0/classcv_1_1Scalar__.html">Scalar</a>(0, 255, 0);</div><div class="line"></div><div class="line">        <a class="code" href="../../d6/d6e/group__imgproc__draw.html#ga28b2267d35786f5f890ca167236cbc69">ellipse</a>(line_image_ed, center, axes, angle, 0, 360, color, 2, <a class="code" href="../../d6/d6e/group__imgproc__draw.html#ggaf076ef45de481ac96e0ab3dc2c29a777a85fdabe5335c9e6656563dfd7c94fb4f">LINE_AA</a>);</div><div class="line">    }</div><div class="line"></div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">"EdgeDrawing result"</span>, line_image_ed);</div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7">waitKey</a>();</div><div class="line">    <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac64d2be7dc8baf62ee45022fcb196aaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac64d2be7dc8baf62ee45022fcb196aaa">◆ </a></span>~FastLineDetector()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual cv::ximgproc::FastLineDetector::~FastLineDetector </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a10d3ce6ef6bce92818d1f919e2b2aa57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10d3ce6ef6bce92818d1f919e2b2aa57">◆ </a></span>detect()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ximgproc::FastLineDetector::detect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>_image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>_lines</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>_lines</td><td>=</td><td>cv.ximgproc_FastLineDetector.detect(</td><td class="paramname">_image[, _lines]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Finds lines in the input image. This is the output of the default parameters of the algorithm on the above shown image. </p>
<div class="image">
<img alt="corridor_fld.jpg" src="../../corridor_fld.jpg"/>
<div class="caption">
image</div></div>
 <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_image</td><td>A grayscale (CV_8UC1) input image. If only a roi needs to be selected, use: <code>fld_ptr-\&gt;detect(image(roi), lines, ...); lines += Scalar(roi.x, roi.y, roi.x, roi.y);</code> </td></tr>
    <tr><td class="paramname">_lines</td><td>A vector of Vec4f elements specifying the beginning and ending point of a line. Where Vec4f is (x1, y1, x2, y2), point 1 is the start, point 2 - end. Returned lines are directed so that the brighter side is on their left. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="aacfbe367964959be1173013f53912fc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacfbe367964959be1173013f53912fc5">◆ </a></span>drawSegments()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ximgproc::FastLineDetector::drawSegments </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>_image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>lines</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>draw_arrow</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>_image</td><td>=</td><td>cv.ximgproc_FastLineDetector.drawSegments(</td><td class="paramname">_image, lines[, draw_arrow]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Draws the line segments on a given image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_image</td><td>The image, where the lines will be drawn. Should be bigger or equal to the image, where the lines were found. </td></tr>
    <tr><td class="paramname">lines</td><td>A vector of the lines that needed to be drawn. </td></tr>
    <tr><td class="paramname">draw_arrow</td><td>If true, arrow heads will be drawn. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/ximgproc/<a class="el" href="../../dd/d2a/fast__line__detector_8hpp.html">fast_line_detector.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:49 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
